package sldm.bdqn.service;

import sldm.bdqn.dao.SysUserMapper;
import sldm.bdqn.entity.SysUser;

import java.util.List;
@Service("sysUserService")
public class SysUserServiceImpl implements SysUserService{
    private SysUserMapper sysUserMapper;
    @Override
    public boolean add(SysUser sysUser){
        boolean result=false;
        try {
            if (sysUserMapper.add(sysUser)==1){
                result=true;
            }
        }catch (RuntimeException e){
            e.printStackTrace();
            throw e;
        }
        return result;
    }
    @Override
    public List<SysUser> getList(SysUser sysUser) {
        try {
            return sysUserMapper.selectSysUserList(sysUser);
        }catch (RuntimeException e){
            e.printStackTrace();
            throw e;
        }
    }
    public SysUserMapper getSysUserMapper(){
        return sysUserMapper;
    }
    public void setSysUserMapper(SysUserMapper sysUserMapper){
        this.sysUserMapper=sysUserMapper;
    }
  @Autowired
    private SysUserMapper sysUserMapper;
    @Override
    public List<SysUser> getList(SysUser sysUser){
        try {
            return sysUserMapper.selectSysUserList(sysUser);
        }catch (RuntimeException e){
            e.printStackTrace();
            throw  e;
        }
    }

}
